﻿<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/font-awesome/font-awesome.min.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>查询</title>
</head>
<body>
	<nav class="breadcrumb"><i class="iconfont">&#xf012b;</i> 首页 <span class="c-gray en">&gt;</span> 查询 <span class="c-gray en">&gt;</span> 查询关键字 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
	<div class="pd-20">
		<div class="text-c">Suche
			<span class="select-box" style="width: 150px"><select name=""
				class="select" id="cata">
					<option selected="selected" value="aps">Alle Kategorien</option>
					<option value="instant-video">Amazon Instant Video</option>
					<option value="mobile-apps">Apps & Spiele</option>
					<option value="automotive">Auto & Motorrad</option>
					<option value="baby">Baby</option>
					<option value="diy">Baumarkt</option>
					<option value="beauty">Beauty</option>
					<option value="clothing">Bekleidung</option>
					<option value="lighting">Beleuchtung</option>
					<option value="stripbooks">Bücher</option>
					<option value="office-products">Bürobedarf & Schreibwaren</option>
					<option value="computers">Computer & Zubehör</option>
					<option value="drugstore">Drogerie & Körperpflege</option>
					<option  value="dvd">DVD & Blu-ray</option>
					<option value="appliances">Elektro-Großgeräte</option>
					<option value="electronics">Elektronik & Foto</option>
					<option value="english-books">Fremdsprachige Bücher</option>
					<option value="videogames">Games</option>
					<option value="outdoor">Garten</option>
					<option value="gift-cards">Geschenkgutscheine</option>
					<option value="pets">Haustier</option>
					<option value="photo">Kamera &amp; Foto</option>
					<option value="digital-text">Kindle-Shop</option>
					<option value="classical">Klassik</option>
					<option value="luggage">Koffer, Rucksäcke & Taschen</option>
					<option value="kitchen">Küche & Haushalt</option>
					<option value="grocery">Lebensmittel & Getränke</option>
					<option value="dvd-bypost">LOVEFiLM DVD Verleih</option>
					<option value="popular">Musik-CDs & Vinyl</option>
					<option value="digital-music">Musik-Downloads</option>
					<option value="mi">Musikinstrumente & DJ-Equipment</option>
					<option value="luxury-beauty">Premium Beauty</option>
					<option value="jewelry">Schmuck</option>
					<option value="shoes">Schuhe & Handtaschen</option>
					<option value="software">Software</option>
					<option value="toys">Spielzeug</option>
					<option value="sports">Sport & Freizeit</option>
					<option value="watches">Uhren</option>
					<option value="magazines">Zeitschriften</option>
			</select></span> <input type="text" name="" id="key" placeholder=" 输入关键字"
				style="width: 250px" class="input-text">
			<button name="" id="search" class="btn btn-success" type="submit">
				<i class="icon-search"></i> 联想一下
			</button>
		</div>
	</div>
	<div class="pd-20">
		<form action="" method="post" class="form form-horizontal"
			id="form-user-add">
			<!--     <div class="row cl"> -->
			<!--       <label class="form-label col-3"><span class="c-red">*</span>用户名：</label> -->
			<!--       <div class="formControls col-5"> -->
			<!--         <input type="text" class="input-text" value="" placeholder="" id="user-name" name="user-name" datatype="*2-16" nullmsg="用户名不能为空"> -->
			<!--       </div> -->
			<!--       <div class="col-4"> </div> -->
			<!--     </div> -->
			<!--     <div class="row cl"> -->
			<!--       <label class="form-label col-3"><span class="c-red">*</span>性别：</label> -->
			<!--       <div class="formControls col-5 skin-minimal"> -->
			<!--         <div class="radio-box"> -->
			<!--           <input type="radio" id="sex-1" name="sex" datatype="*" nullmsg="请选择性别！"> -->
			<!--           <label for="sex-1">男</label> -->
			<!--         </div> -->
			<!--         <div class="radio-box"> -->
			<!--           <input type="radio" id="sex-2" name="sex"> -->
			<!--           <label for="sex-2">女</label> -->
			<!--         </div> -->
			<!--         <div class="radio-box"> -->
			<!--           <input type="radio" id="sex-3" name="sex"> -->
			<!--           <label for="sex-3">保密</label> -->
			<!--         </div> -->
			<!--       </div> -->
			<!--       <div class="col-4"> </div> -->
			<!--     </div> -->
			<!--     <div class="row cl"> -->
			<!--       <label class="form-label col-3"><span class="c-red">*</span>手机：</label> -->
			<!--       <div class="formControls col-5"> -->
			<!--         <input type="text" class="input-text" value="" placeholder="" id="user-tel" name="user-tel"  datatype="m" nullmsg="手机不能为空"> -->
			<!--       </div> -->
			<!--       <div class="col-4"> </div> -->
			<!--     </div> -->
			<!--     <div class="row cl"> -->
			<!--       <label class="form-label col-3"><span class="c-red">*</span>邮箱：</label> -->
			<!--       <div class="formControls col-5"> -->
			<!--         <input type="text" class="input-text" placeholder="@" name="email" id="email" datatype="e" nullmsg="请输入邮箱！"> -->
			<!--       </div> -->
			<!--       <div class="col-4"> </div> -->
			<!--     </div> -->
			<!--     <div class="row cl"> -->
			<!--       <label class="form-label col-3">附件：</label> -->
			<!--       <div class="formControls col-5"> <span class="btn-upload form-group"> -->
			<!--         <input class="input-text upload-url" type="text" name="uploadfile-2" id="uploadfile-2" readonly  datatype="*" nullmsg="请添加附件！" style="width:200px"> -->
			<!--         <a href="javascript:void();" class="btn btn-primary radius upload-btn"><i class="iconfont">&#xf0020;</i> 浏览文件</a> -->
			<!--         <input type="file" multiple name="file-2" class="input-file"> -->
			<!--         </span> </div> -->
			<!--       <div class="col-4"> </div> -->
			<!--     </div> -->
			<!--     <div class="row cl"> -->
			<!--       <label class="form-label col-3">所在城市：</label> -->
			<!--       <div class="formControls col-5"> <span class="select-box"> -->
			<!--         <select class="select" size="1" name="demo1" datatype="*" nullmsg="请选择所在城市！"> -->
			<!--           <option value="" selected>请选择城市</option> -->
			<!--           <option value="1">北京</option> -->
			<!--           <option value="2">上海</option> -->
			<!--           <option value="3">广州</option> -->
			<!--         </select> -->
			<!--         </span> </div> -->
			<!--       <div class="col-4"> </div> -->
			<!--     </div> -->
			<div class="row cl">
				<label class="form-label col-3"></label>
				<div class="formControls col-7">
					<textarea id="lianxiang" name="" cols="" rows=""
						style="height: 360px" class="textarea"
						placeholder=""></textarea>
				</div>
				<div class="col-4"></div>
			</div>
			<!--     <div class="row cl"> -->
			<!--       <div class="col-9 col-offset-3"> -->
			<!--         <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;"> -->
			<!--       </div> -->
			<!--     </div> -->
		</form>
	</div>
	
	
	<script type="text/javascript" src="lib/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer1.8/layer.min.js"></script>
	<script type="text/javascript" src="lib/laypage/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript" src="lib/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.doc.js"></script>
<script type="text/javascript">
		$(function() {
			$("#search").click(
					function() {
						var kestr = $("#key").val();
					
						$.ajax({
							type : "GET",
							url : "ajax.do",
							data : "name=" + $("#key").val() + "&age="+$("#cata").val(),
							dataType : "text",
							success : function(msg) {
								var backInf = eval('(' + msg + ')');
								var str = "";
								var key = backInf[0];
								var jsons1 = backInf[1];
								
								if(jsons1.length!=0)
								{
									var first=jsons1[0];
									
									
									//alert(nodesa.length);
									var kestr = $("#cata").find("option:selected").text();
									str += first + " in "+ kestr+ "\r\n"
											
									var i = 0;
									var jsons = backInf[2];
									
									var nodesa = jsons[0].nodes;
							
							
									
									if(nodesa!=undefined)
									{
										while (i < nodesa.length) {
									// 					alert("key："+nodesa[i].name+",value："+nodesa[i].alias);
										str += first + " in "+ nodesa[i].name + "\r\n"
										i++;
										}
										str += "-------------------------------------------------------\r\n";
									}
									
									var jsons1 = backInf[1];
									//str+=jsons1+"\r\n"
									var i = 1;
									while (i < jsons1.length) {
										str += jsons1[i] + "\r\n"
										// 					alert("key："+jsons1[i]); 
										i++;
									}
								}
								
								
								
								$("#lianxiang").text(str);
							},
							error : function(msg) {

								//var backInf = eval('(' + msg + ')');

							}
						});
					});
		});
	</script>
		
</body>
</html>